package com.css.apps.task.demo;

import java.util.List;

import com.css.apps.task.job.JobTemplate;
import com.css.apps.task.model.TTask;
import com.css.db.query.QueryCache;

public class JobDemo extends JobTemplate {
	
	@SuppressWarnings("unchecked")
	public List<TTask> beforeJob() {
		System.out.println("jobDemo beforeJob");
		List<TTask> taskList = QueryCache.idToObj(TTask.class,
				new QueryCache("select a.id from TTask a where a.openFlag=1").list());
		return taskList;
	}

	public void doJob(Object obj) {
		System.out.println("-----------------jobDemo doJob-----------------");
		TTask tt = (TTask) obj;
		if (tt != null)
			System.out.println(tt.getUuid() + ":" + tt.getName());
	}
}
